<div class="table_header">
    {phrase var='answer.add_new_level'}
</div>
<form action="{url link='admincp.answer.level'}" method="post">
    <div class="table">
        <div class="table_left">
            {phrase var='answer.label'}
        </div>
        <div class="table_right">
            <input type="text" name="val[name]" value="{value type='input' id='name'}" id="name" size="30" />
        </div>
    </div>
    <div class="table">
        <div class="table_left">
            {phrase var='answer.group_min_point'}
        </div>
        <div class="table_right">
            <input type="text" name="val[minpoint]" value="{value type='input' id='minpoint'}" id="minpoint" size="30" />
        </div>
    </div>

    <div class="table">
        <div class="table_left">
            {phrase var='answer.group_max_point'}
        </div>
        <div class="table_right">
            <input type="text" name="val[maxpoint]" value="{value type='input' id='maxpoint'}" id="maxpoint" size="30" />
        </div>
    </div>


    <div class="table">
        <div class="table_left">
            {phrase var='answer.group_name'}
        </div>
        <div class="table_right">
            <select name="val[group_id]" id="group_id" style="width: 180px;">
                
                {foreach from=$aGroups item=aItem}
                <option value="{$aItem.user_group_id}">{$aItem.title}</option>
                {/foreach}
            </select>
        </div>
    </div>
    <div class="table">
        <div class="table_left">
            {phrase var='answer.previous_group'}
        </div>
        <div class="table_right">
            <select name="val[previous_group]" id="previous_group" style="width: 180px;">
                <option value="2">{phrase var='answer.select'}</option>
                {foreach from=$aGroups item=aItem}
                <option value="{$aItem.user_group_id}">{$aItem.title}</option>
                {/foreach}
            </select>
        </div>
    </div>
    <div class="table_clear">
        <input type="submit" value="{phrase var='answer.submit'}" class="button" name="add_category">
    </div>
</form>
    <br>
<div class="table_header">
    {phrase var='answer.list_level'}
</div>
<div class="table">
    <table id="js_drag_drop">
        <tr>

            <th style="width:20px"></th>
            <th style="width:20px"></th>
            <th >{phrase var='answer.id'}</th>
            <th style="width:220px">{phrase var='answer.label'}</th>
            <th style="width:220px">{phrase var='answer.previous_group'}</th>
            <th style="width:220px">{phrase var='answer.group_name'}</th>
            <th style="width:220px">{phrase var='answer.group_min_point'}</th>
            <th style="width:220px">{phrase var='answer.group_max_point'}</th>
        </tr>
        {foreach from=$aLevels item=aItem}
        <tr>

            <td>

                <a href="{url link='admincp.answer.level.edit' id=$aItem.id}" >
                    {img theme='misc/page_white_edit.png' style='vertical-align:middle;'}
                </a>
            </td>
            <td>
                <a href="{url link='admincp.answer.level' delete=$aItem.id}" class="sJsConfirm">
                    {img theme='misc/delete.png' style='vertical-align:middle;'}
                </a>
            </td>
            <td>{$aItem.id}</td>
            <td>{$aItem.name}</td>
            <td>{$aItem.previous_group_name}</td>
            <td>{$aItem.group_name}</td>
            <td>{$aItem.minpoint}</td>
            <td>{$aItem.maxpoint}</td>
        </tr>
        {/foreach}
    </table>
</div>
